﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MVCScaffold.Suporte;

namespace MVCScaffold.GeradoresDeCodigo
{
    public abstract class GeradorBase
    {
        public abstract void GerarControllers();
        public abstract void GerarViewCreate();
        public abstract void GerarViewEdit();
        public abstract void GerarViewDelete();
        public abstract void GerarViewDetails();
        public abstract void GerarViewIndex();
        public abstract void AdicionarItensGeradoNoProjeto();

        public delegate void StatusEventHandler(object sender, StatusEventArgs e);
        public event StatusEventHandler StatusEvent;
        protected virtual void OnStatus(StatusEventArgs e)
        {
            if (StatusEvent != null)
                StatusEvent(this, e);
        }

        public void Executar()
        {
            GerarControllers();
            GerarViewCreate();
            GerarViewEdit();
            GerarViewDelete();
            GerarViewDetails();
            GerarViewIndex();
            AdicionarItensGeradoNoProjeto();
        }
    }
}

